package com.rlax.ccdemo.service.api.user.fegin;

import com.rlax.corebin.core.result.R;
import com.rlax.corebin.security.entity.AuthUser;
import com.rlax.corebin.security.feign.AuthQuery;
import com.rlax.corebin.security.feign.AuthService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 鉴权API
 * @author Rlax
 *
 */
@FeignClient(name = "${corebin.security.oauth-service:oauth-service}")
public interface IAuthApi extends AuthService {

    String API_PREFIX = "/tp/user";

    /**
     * 获取用户鉴权信息
     * @param id 用户ID
     * @param authQuery 查询条件
     * @return 用户信息
     */
    @PostMapping(value = API_PREFIX + "/auth/{id}")
    @Override
    R<AuthUser> getAuthInfo(@PathVariable("id") Long id, @RequestBody AuthQuery authQuery);

}
